﻿using Gx.Model.Entity;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Gx.Model.ViewModel
{
    public class LKTransferDto : AttachmentDto
    {
        public LKTransfer Transfer { get; set; } = new LKTransfer();
        public List<LKTransferDetail> Details { get; set; } = new List<LKTransferDetail>();
        public List<LKTransferCost> Costs { get; set; } = new List<LKTransferCost>();

        public List<LKTransferCost> InCosts 
        {
            get
            {
                return Costs?.Where(x => x.TransferType == 1).ToList();
            }
        }
        public List<LKTransferCost> OutCosts 
        {
            get
            {
                return Costs?.Where(x => x.TransferType == 2).ToList();
            }
        }
    }
}
